import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default ({ mode }) =>defineConfig({
  plugins: [vue()],
  define: {
    'process.env': loadEnv(mode, process.cwd())
  },
  base: process.env.NODE_ENV === 'production' ? '/static/dist/' : '/',
})
